const prodPlugins = []
if (process.env.NODE_ENV === 'production') {
  prodPlugins.push('transform-remove-console')
}

module.exports = {
  presets: [
    '@vue/cli-plugin-babel/preset'
  ],
  // 在开发阶段不要让 transform-remove-console 插件生效
  // 在发布阶段,让 transform-remove-console 插件生效
  plugins: ['@babel/plugin-syntax-dynamic-import', ...prodPlugins]
  // plugins: ['@babel/plugin-syntax-dynamic-import', 'transform-remove-console']
}
